package com.gsit.orc.controller;

import com.thoughtworks.selenium.DefaultSelenium;

public class ReceiptsController implements Controller{

	private DefaultSelenium selenium;
	
	private String FINLE_ST = "0 unprocessed receipts";
	
	
	
	public ReceiptsController(DefaultSelenium selenium) {
		super();
		this.selenium = selenium;
	}



	@Override
	public void execute() throws Exception{
		
		selenium.click("//a[contains(@href, 'Receipts')]");
        selenium.waitForPageToLoad("30000"); 
        
        
        String str = selenium.getText("//div[@id='MainContent_TimedPanel2']/table/tbody/tr/td");
        
        if(str.contains(FINLE_ST)){
        	System.out.println(">>>>>>>>>>>>>>>> NO DATA FOUND >>>>>>>>>>>>>>>>");
        }
        
        Thread.sleep(5000); 
        
        
		
	}

}
